package router

import (
	"github.com/cloudwego/hertz/pkg/app/server"
	"github.com/ezcloud/ezapp/api/handler"
	"github.com/hertz-contrib/pprof"
)

var (
	EXCLUDE_URL = []string{
		"/ping",
		`^/favicon\.(ico|png)$`,
		"^/api/v1/auth/(login|logout)$",
		"^/debug/pprof/.*$",
	}
)

// 基础 routes
func defaultRegister(r *server.Hertz) {
	r.GET("/ping", handler.Ping)
	r.GET("/favicon.ico", handler.Favicon)
}

// 自定义 routes
func customizedRegister(r *server.Hertz) {
	a := r.Group("/debug")
	pprof.RouteRegister(a, "pprof")
}

// 生成 routes
func generatedRegister(r *server.Hertz) {
	api := r.Group("/api/v1")
	{
		auth := api.Group("/auth")
		{
			auth.GET("/login", handler.AuthLogin)
		}
	}
}
